<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>数据模板</title>
    <link rel="stylesheet" href="../../assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="../../assets/module/dtree/dtree.css"/>
    <link rel="stylesheet" href="../../assets/module/dtree/font/dtreefont.css"/>
    <link rel="stylesheet" href="../../assets/module/admin.css?v=313"/>
    <link rel="stylesheet" href="../../assets/css/publicStyle.css"/>
    <!--[if lt IE 9]>
    <script src="../../assets/libs/html5shiv.min.js"></script>
    <script src="../../assets/libs/respond.min.js"></script>
    <![endif]-->
    <style>
        .layui-form-select .layui-edge{
            left: 158px;
        }
        #tableClassify-tmpl-box .layui-form-select{
            display: inline-block;
            float: left;
            margin-right: 15px;
        }
        #tableClassify-tmpl-box .layui-btn{
            float: left;
        }
        #page-box{
            float: right;
        }
        #tableClassify-tmpl-box{
            float: left;
        }
        #page-box .layui-laypage{
            margin: 0;
        }
    </style>
    <!-- 正文开始 -->
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">数据模板</div>
        <div class="layui-card-body" >
            <div id="tableClassify-tmpl-box"></div>
            <div id="page-box"></div>
            <table class="layui-table" id="tableTbTree" lay-filter="tableTbTree" lay-skin="nob"></table>
        </div>
    </div>
</div>
<!--渲染报告期类型-->
<script type="text/tmpl" id="template-microGroup-tmpl">
    <option value="">全部</option>
     {{each reportData}}
        <option value="{{$value.value}}">{{$value.key}}</option>
    {{/each}}

</script>
<!--渲染编辑新增报告期类型-->
<script type="text/tmpl" id="template-micro-tmpl">
     {{each reportData}}
        <option value="{{$value.value}}">{{$value.key}}</option>
    {{/each}}

</script>
<!-- 表格操作列 -->
<script type="text/html" id="tablePower-tmpl-box">

</script>

<!-- 表格操作列 -->
<script type="text/tmpl" id="tablePower-tmpl">
    {{ if hasPower("/meta/class:edit")}}
    <a class="layui-btn layui-btn-xs layui-btn-warning" lay-event="edit">编辑</a>
    {{/if}}
    {{ if hasPower("/meta/class:delete")}}
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    {{/if}}
</script>

<!--渲染数据表权限-->
<script type="text/tmpl" id="tableClassify-tmpl">
    <div class="layui-form toolbar">
        <div class="layui-form-item">
            <div class="layui-inline">
                {{ if hasPower("/meta/class:queryList")}}
                <select name="report" id="province" lay-filter="province" lay-verify="required" lay-search="">
                </select>
                {{/if}}
                {{ if hasPower("/meta/class:add")}}
                <button class="layui-btn icon-btn layui-btn-sm" id="addClassify">
                    <i class="layui-icon">&#xe654;</i>新增
                </button>
                {{/if}}
            </div>
        </div>
    </div>
  </script>

<!--新增数据表弹窗-->
<script type="text/html" id="addClassifyForm">
    <form id="modelUserForm" lay-filter="modelUserForm" class="layui-form model-form">

        <div class="layui-form-item">
            <label class="layui-form-label">分类名称</label>
            <div class="layui-input-block">
                <input name="name" placeholder="请输入分类名称" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" lay-verify="required"  />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">分类代码</label>
            <div class="layui-input-block">
                <input name="code" placeholder="请输入分类代码" type="number" class="layui-input" maxlength="20"
                       lay-verType="tips" lay-verify="required|number|code"  />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">报告期类型</label>
            <div class="layui-input-block" id="roleName-box">
                <select name="reportType" id="addReport-box" lay-filter="aihao" lay-verify="required" >

                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">分类描述</label>
            <div class="layui-input-block">
                <textarea name="memo" placeholder="请输入分类描述" class="layui-textarea" maxlength="20"
                lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closePageDialog">取消</button>
            <button class="layui-btn" lay-filter="modelSubmitUser" lay-submit>确定</button>
        </div>
    </form>
</script>

<!--编辑数据表弹窗-->
<script type="text/html" id="editClassifyForm">
    <form id="editUserModelForm" lay-filter="modelUserForm" class="layui-form model-form">
        <div class="layui-form-item">
            <label class="layui-form-label">分类名称</label>
            <div class="layui-input-block">
                <input name="name" placeholder="请输入分类名称" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" lay-verify="required" required />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">报告期类型</label>
            <div class="layui-input-block" id="">
                <select name="reportType" id="editReport-box" lay-filter="aihao" required>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">分类描述</label>
            <div class="layui-input-block">
                <textarea name="memo" placeholder="请输入分类描述" class="layui-textarea" maxlength="500" lay-verType="tips" lay-verify="required" />
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closePageDialog">取消</button>
            <button class="layui-btn" lay-filter="editUserModelForm" lay-submit>确定</button>
        </div>
    </form>
</script>


<!-- js部分 -->
<script type="text/javascript" src="../../assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="../../assets/js/common.js?v=313"></script>

<script src="../../assets/libs/template-web.js"></script>
<script src="../../assets/libs/axios.min.js"></script>
<script src="../../assets/js/config.js"></script>
<script src="../../assets/js/authority.js"></script>

<script src="../../assets/js/metadata/tableClassify.js"></script>

</body>

</html>